<!DOCTYPE html>
<html>
  <head>
    <title>我的信息</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
      <link rel="stylesheet" href="${s.base}/mobile/base/css/weui.min.css">
      <link rel="stylesheet" href="${s.base}/mobile/base/css/jquery-weui.css">
      <link rel="stylesheet" href="${s.base}/mobile/wechat/css/base.css">
      <link rel="stylesheet" href="${s.base}/mobile/wechat/css/component.css">
      <link rel="stylesheet" type="text/css" href="${s.base}/mobile/base/lib/DateSelector/DateSelector.css?rev=@@hash"/>
  </head>
  <body>
	<div class="xyg-comp-list-select" style="margin-top: 0.5rem;">
       <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title"> 
             微信昵称:
            </div>
             <div class="xyg-comp-list-select-item-content"> 
             <input type="text" value="${webMember.nickName}" disabled />
            </div>
       </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                <span style="letter-spacing: 0.25rem;">会员号</span>:
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="${webMember.cardNo}" readonly />
            </div>
        </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                <span style="letter-spacing: 0.75rem;">姓名</span>:
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="${webMember.name}"  placeholder="请输入姓名" id="name" />
            </div>
        </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
               <span style="letter-spacing: 0.25rem;">手机号</span>:
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="${webMember.phone}" placeholder="请输入手机号" id="phone" style="width: 60%; float: left;" />
                <div style="width: 40%;float: left; "><a style="height: 1.5rem; line-height: 1.5rem; font-size: 13px; margin-top: 0.2rem;" id="sendSms" href="javascript:sendSms();" class="weui-btn weui-btn_warn">获取验证码</a></div>
                <div class="clearBoth"></div>
            </div>
        </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                <span style="letter-spacing: 0.25rem;">验证码</span>:
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="" placeholder="请输入短信验证码" id="code" />
            </div>
        </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                银行卡号:
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="${webMember.bankNo}" id="bankNo" placeholder="请输入银行卡号,用于提现使用" />
            </div>
        </div>
  	</div>
   <div class="xyg-bottom">
       <a href="javascript:submit();" class="weui-btn weui-btn_warn">修改</a>
    </div>

  <style type="text/css">
	  html,body{background:#f5f5f5;}
  	.xyg-comp-list-select{width:92%; margin: 0px 4%; height:auto;}
	  .xyg-comp-list-select .xyg-comp-pic{width:90%; padding:0.5rem 5%; background: #FFF;}
	  .xyg-comp-list-select .xyg-comp-pic-title{width:100%;line-height:1.5rem; padding-bottom: 0.5rem; font-size: 0.8rem; color:#000; letter-spacing: 0.01rem; }
	  .xyg-comp-list-select .xyg-comp-pic-title-left{width: 50%; height: 6rem; float: left;}
	   .xyg-comp-list-select .xyg-comp-pic-title-left img{width: 100%; height: 6rem;}
	   .xyg-comp-list-select .xyg-comp-pic-title-right{width: 50%; height: 6rem; float: left;}
	  
	.xyg-comp-list-select-item{width:90%; padding:0px 5%; line-height:2.2rem; height:2.2rem;font-size: 0.8rem; color:#000; letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
	  
 .xyg-comp-list-select-item textarea::-webkit-input-placeholder {
  /* WebKit browsers */
  color: #999999;
}
 .xyg-comp-list-select-item textarea:-moz-placeholder {
  /* Mozilla Firefox 4 to 18 */
  color: #999999;
}
 .xyg-comp-list-select-item textarea::-moz-placeholder {
  /* Mozilla Firefox 19+ */
  color: #999999;
}
 .xyg-comp-list-select-item textarea::-ms-input-placeholder {
  /* Internet Explorer 10+ */
	color: #999999;}
 

	  .xyg-comp-list-select-item input::-webkit-input-placeholder {color: #999999;}
	.xyg-comp-list-select-item .xyg-comp-list-select-item-icon{width:76%; line-height:2rem; text-align:right; float:left; color: #999999;}
	.xyg-comp-list-select-item .xyg-comp-list-select-item-title{width:24%; height:2rem; text-align:left; float:left;}
	.xyg-comp-list-select-item .xyg-comp-list-select-item-content{width:76%; height:2rem; text-align:left; float:left;}
	.xyg-comp-list-select-item .xyg-comp-list-select-item-content input{width:100%; height:2rem; line-height:2rem;background-color:transparent;border:0;}
	.xyg-comp-xy{height:2rem; line-height:2rem; width:width:93%; margin:0px 2% 0px 5%;}
	.xyg-bottom{width:90%; height:auto;  margin:1.5rem 5%;}
  </style>
  </body>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  <script src="${s.base}/mobile/base/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/swiper.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/component.js?12323434323232323232" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/wechat/fonts/iconfont.js"></script>
  <script src="${s.base}/mobile/wechat/js/window_port.js"></script>
  <script src="${s.base}/mobile/wechat/js/base.js"></script>
  <script type="text/javascript">
      var memberId='${memberId}';
      function submit() {
          var id = $("#id").val();
          var name = $("#name").val();
          if(name == null || name == "") {
              $.toast("请输入姓名", "text");
              return false;
          }
          var phone = $("#phone").val();
          if(phone == null || phone == "") {
              $.toast("请输入手机号", "text");
              return false;
          }else if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
              $.toast("手机码填写错误", "text");
              return false;
          }
          var code = $("#code").val();
          if(code == null || code == "") {
              $.toast("请输入验证码", "text");
              return false;
          }
          var bankNo = $("#bankNo").val();
          if(bankNo == null || bankNo == "") {
              $.toast("请输入银行卡号", "text");
              return false;
          }
          $.fn.postMethodResult("/weChat/memberSave",{'id':memberId,'name':name,'phone':phone,'bankNo':bankNo,'code':code},function (data) {
              $.alert("操作成功",function () {
                  goMyPage(memberId);
              });
          });
      }
      var sendFlage=true;//发送标志，true为可以发送
      function sendSms(){
          if(!sendFlage){
              return false;
          }
          sendFlage=false;
          var phone = $("#phone").val();
          if(phone == null || phone == "") {
              $.toast("请输入手机号", "text");
              sendFlage=true;
              return false;
          }else if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
              $.toast("手机码填写错误", "text");
              sendFlage=true;
              return false;
          }

          $.fn.postBase("/weChat/smsSend",{'phone':phone},function (result) {
              if (result.code === 0) {
                  //操作成功
                  $.toast("短信发送成功", "text");
                  getRandomCode();
              } else {
                  sendFlage=false;
                  //操作失败
                  $.toast(result.msg, "text");
              }
          });
      }

      var time = 60;
      //倒计时
      function getRandomCode() {
          if (time === 0) {
              time = 60;
              sendFlage=true;
              $('#sendSms').html("获取验证码");
              return;
          } else {
              time--;
              $('#sendSms').html(time+"秒");
          }
          setTimeout(function() {
              getRandomCode();
          },1000);
      }

  </script>
</html>

